Data centers, cloud computing infrastructures, compute clusters, enterprise computational facilities, and high performance computing facilities are increasingly using virtual machines to isolate workloads while running the workloads on shared physical servers. A virtual machine is an emulation of a computing device that is strictly software yet acts like a physical computing device. This means that one or more virtual machines can reside on a single physical host server. It appears to clients and all software running on the virtual machines, however, that each virtual machine is an independent server.
Virtualization (or the use of virtual machines) allows multiple applications to be safely placed on a single physical host server because each application operates inside its “virtual” computer and does not affect other applications. This allows server resources to be better utilized and reduces the number of servers required as well as the operational costs of hosting them such as electricity and cooling. Hence, virtualization is an efficient technique for managing computational resources and is gaining widespread acceptance in data centers and large scale computing facilities.
Data centers and other computing facilities often monitor power usage of servers to correctly manage the power capacity and distribution. The power measurement data is also used to make several manual and automated power management decisions. In fact power metering is so widespread in data centers that power distribution units (PDUs), power strips, server power supplies and in newer servers even server motherboards already contain the power metering instruments required to measure power. Another way to measure power consumption in a physical server is to connect a power metering instrument to the server.
Power consumption for a physical server can be measured by metering the electricity supplied to the server. Virtual machines, however, are created in software and there is no easy way to connect a power meter to a virtual machine. This makes it quite difficult to measure power consumption of virtual machines. Techniques used for physical servers can only report the total power draw of the server. But they cannot be used to measure the individual power consumption of each of the multiple virtual machines that reside on the single physical host server. In fact, the power consumption of a virtual machine cannot be measured using purely hardware solutions.
The ability to measure the power consumption of a virtual machine is important. Users or server managers are unable to measure the power used by each virtual machine. Measuring this power is useful for several reasons. For example, if a virtual machine is using excessive power it may have to be shut down or migrated to a different power circuit with excess capacity. In addition, software developers can measure how much energy their software consumes when executed on a physical server but cannot measure it when running on a virtual machine. Not being able to measure the power usage cripples the developer's ability to optimize the software for lower power consumption. Another use of measuring a virtual machine's power consumption is to charge back users based on power use. Shared physical servers, such as used in cloud computing, allow multiple users to run virtual machines on the shared physical infrastructure. The owner of the physical servers may wish to charge the virtual machine users based on power use.
Yet another use of virtual machine power metering, and one that is discussed in more detail below, arises in virtual machine power capping. Power capping allows over-subscription of the power infrastructure and results in more efficient utilization of the power capacity. However, current power capping techniques are designed for physical servers and do not work well when applied to virtual machines. For example, capping the power of a physical server results in the capping of all virtual machines that are hosted on the server. This violates the isolation of workloads provided by virtual machines and can defeat the advantages of using virtualization.
Thus, one of the major components of power management in large scale computational facilities is the visibility into power. This capability, however, is lacking in virtualized machines that are increasingly being used in data centers. The use of virtual machines allows safe isolation of multiple co-located workloads, enabling multiple workloads to be consolidated on fewer servers, and results in improved resource utilization. However, the lack of visibility into virtual machine power usage takes away the many advantages of server power metering that were available without virtualization.